﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using W7Toshil.Entity;
using W7Toshil.DataAccess;
using System.Collections.Generic;


namespace W7Toshil.Services
{
    public class ExpenseTransaction : ITransaction<Expense>
    {

        #region ITransaction<Expense> Members

        public void Add(Expense entity)
        {
            if (null == entity)
            {
                throw new ArgumentNullException();
            }

            ITransactionDao<Expense> expenseDao = new ExpenseTransactionDao();

            expenseDao.Insert(entity);


        }

        public void Update(Expense Entity)
        {
            throw new NotImplementedException();
        }

        public void Delete(long id)
        {
            throw new NotImplementedException();
        }

        public IList<Expense> FetchByDate(DateTime date)
        {
            throw new NotImplementedException();
        }

        public IList<Expense > FetchAll()
        {
            ITransactionDao<Expense> transactionDao = new ExpenseTransactionDao();
            return transactionDao.FetchAll();
            
            

        }

        public Expense Get(long id)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
